package com.novax.ex.activity.provider.api;

import com.novax.ex.activity.provider.api.model.AssetChangeRequest;
import com.novax.ex.activity.provider.common.ServerName;
import com.novax.ex.common.results.ReturnResult;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(url = "${remote.spot-service.endpoint}", name = "SpotApi", contextId = "SpotApi")
public interface SpotApi {

    @GetMapping(value = "/spot/order/records/count")
    ReturnResult<Integer> spotCount(@RequestParam("uid") Long uid,  @RequestParam("type") Integer type);

    @PostMapping(value = "/private/asset/spot")
    ReturnResult<?> assetChange(@RequestBody AssetChangeRequest assetChangeRequest);

    /**
     * Description: 交易市场所属模块
     * @param: []
     * @return: com.aliex.ex.common.tool.returnresult.ReturnResult<java.util.List<java.lang.String>>
     * @author: my.miao
     * @date: 2021/7/14 15:22
     */
    @Operation(summary = "交易市场所属模块")
    @GetMapping(value = "/spot/symbol/config/module")
    ReturnResult<List<String>> symbolModule(@RequestHeader("language") String language);

}
